<!DOCTYPE html>
<html>
<head>
    <meta data-th-replace="~{fragments :: meta-charset}">
    <meta data-th-replace="~{fragments :: meta-viewport}">
    <link data-th-replace="~{fragments :: favicon}">
    <title>编辑</title>
    <link data-th-replace="~{fragments :: bootstrap-css}"/>
    <link data-th-replace="~{fragments :: common-css}"/>
</head>
<body>

<nav data-th-replace="~{fragments :: header}"></nav>

<main role="main" class="container">
    <form method="post" data-th-action="@{/article/save}">
        <input data-th-if="${article != null}" type="hidden" name="id" data-th-value="${article.id}">
        <div class="form-group">
            <label>标题</label>
            <input type="text" class="form-control" name="title" placeholder="请输入标题" data-th-value="${article != null ? article.title : ''}">
        </div>
        <div class="form-group">
            <label>内容</label>
            <textarea class="form-control" name="content" placeholder="请输入内容" data-th-utext="${article != null ? article.content : ''}"></textarea>
        </div>
        <button type="submit" class="btn btn-primary">保存</button>
    </form>
</main>

<footer data-th-replace="~{fragments :: footer}"></footer>
</body>
</html>